export interface FetchAddressListReq {
  id?: number
  pageNo?: number
  pageSize?: number
}
export interface FetchAddressListRes {
  pageNo: number
  pageSize: number
  totalCount: number
  totalPage: number
  data: Array<{
    selectOrgId: number | null
    id: number
    orgId: number
    uid: number
    province: string
    city: string
    district: string
    street: string
    tit: string
    phone: string
    address: string
    defaultValue: number
  }>
}

export interface NewAddressItemReq {
  province: string
  city: string
  district: string
  tit: string
  address: string
  phone: string
  defaultValue: number
  location?: string
  locationAddress: any
}
export interface EditAddressItemReq extends NewAddressItemReq {
  id: number
}
export interface NewAddressItemRes {
  selectOrgId: null | number
  id: number
  orgId: number
  uid: number
  province: string
  city: string
  district: string
  street: null | string
  tit: string
  phone: string
  address: string
  defaultValue: number
}

export interface AddComplaintReq {
  common: string
  imgs?: string
  mobile: string
  orderCode: string
  uid: number
}

interface ConfigType1 {
  name: string
  value: string | null
  url: string | null
  key: string
}
interface ConfigType2 {
  name: string
  value: string
  key: string
}
export interface ParamConfig {
  appletSet: {
    alipayMessageId: ConfigType1
    alipayRentId: ConfigType1
    needLinkman: ConfigType1
    compayName: ConfigType1
    payType: ConfigType1
    phone: ConfigType1
    appName: ConfigType1
    sellPoster: ConfigType1
    hidePayBtn?: ConfigType1
    skipPayFlow?: ConfigType1
    useAlipayFace?: ConfigType1
    openPersionFace?: ConfigType1
  }
  productDetails: {
    [key: string]: ConfigType1
  }
  rentExplain: {
    [key: string]: ConfigType1
  }
  appletTagSet: {
    [key: string]: ConfigType2
  }
  wxPayConfig: {
    [x in 'h5PublicAppId' | 'h5AppId' ]: string
  }
}
export type ParamConfigRes = [
  { appletSet: ParamConfig['appletSet'] },
  { productDetails: ParamConfig['productDetails'] },
  { rentExplain: ParamConfig['rentExplain'] },
  { appletTagSet: ParamConfig['appletTagSet'] },
  { wxPayConfig: ParamConfig['wxPayConfig'] },
]

export interface QueryAntSignRes {
  signStr: string
  tenantId: string
  merchantId: string
  orderId: string
  redirectUrl: string
}

interface ListArticleItem {
  selectOrgId: number | null
  id: number
  orgId: number
  typeName: string
  icon: string
  sort: number
  status: number
  createdTime: string
  listArticle: {
    selectOrgId: number | null
    id: number
    orgId: number
    articleTypeId: number
    title: string
    createTime: string
    articleContent: string
    status: number
    sort: number
  }[]
}
export interface ListArticleRes {
  data: ListArticleItem[]
  pageNo: number
  pageSize: number
  totalCount: number
  totalPage: number
}

export interface OcrCheckReq {
  faceUrl: string
}
export interface OcrCheckRes {
  faceInfo: {
    num: string
    sex: string
    name: string
    birth: string
    address: string
    nationality: string
  }
}
